package com.rhtchr.angelbaby.knowledge;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.model.StyleSheet;
import org.apache.poi.hwpf.usermodel.Paragraph;
import org.apache.poi.hwpf.usermodel.ParagraphProperties;
import org.apache.poi.hwpf.usermodel.Range;

public class ArticleManager {

	/**
	 * @param args
	 * @throws IOException
	 * @throws FileNotFoundException
	 */
	public static void main(String[] args) throws Exception {
		HWPFDocument msWord = new HWPFDocument(new FileInputStream(new File("")));
		StyleSheet styleSheet = msWord.getStyleSheet();
		Range range = msWord.getRange();
		int numParagraph = range.numParagraphs();
		for (int i = 0; i < numParagraph; i++) {
			Paragraph p = range.getParagraph(i);
			ParagraphProperties paragraphStyle = styleSheet.getParagraphStyle(i);
		}
	}
}
